
<script type="text/javascript" charset="utf-8">

		var province_id;
		var city_id;
		var area_id;
		$(function(){
			
			province_id = $('#province_id').combobox({
				url:'/idcpost/regionprovinceinfo',
				valueField:'id',
				textField:'province_name',
				editable:false,
				panelHeight:'150',
				required:true,
				onSelect:function(record){
					//刷新数据，重新读取省份下的城市，并清空当前输入的值
					
					city_id.combobox({
						url:'/idcpost/regioncityinfo?id='+record.id,
						valueField:'id',
						textField:'city_name',
						editable:false,
						panelHeight:'150',
						required:true,
						onSelect:function(city){
							//刷新数据，重新读取省份下的城市，并清空当前输入的值
							area_id.combobox({
								url:'/idcpost/regionareainfo?id='+city.id,
								valueField:'id',
								textField:'area_name',
								editable:false,
								panelHeight:'150',
								required:true,
							}).combobox('clear');
							//area_id.combobox().combobox('clear');
						}
					}).combobox('clear');
					//city_id.combobox().combobox('clear');
					area_id.combobox().combobox('clear');
					
				}
			});
						
			//市
			city_id = $('#city_id').combobox({
				valueField:'id',
				textField:'city_name',
				editable:false,
				required:true,
			});
			
			//区
			area_id = $('#area_id').combobox({
				valueField:'id',
				textField:'area_name',
				editable:false,
				required:true,
			});
		});

</script>

<div style="padding: 5px;">
	<form method="post">
		<table class="tableForm">
			<tr>
                  <th style="width:80px;">运营商</th>
                  <td>
                  <input style="line-height:26px;border:1px solid #ccc;width:200px" class="easyui-combobox" 
                        name="networkbusiness_id"
                        data-options="
                        url:'/idcpost/networkbusinessinfo',
                        valueField:'id',
                        textField:'networkbusiness_name',
                        editable:false,
                        required:true,
                        panelHeight:'auto'
                    " />
                  </td>
			</tr>
            <tr>
				<th style="width: 80px;">机房名称</th>
				<td><input name="cr_name" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写机房名称'" style="width: 200px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">机房等级</th>
				<td><input name="cr_level" class="easyui-numberbox" data-options="min:1,max:5,required:'true',missingMessage:'请填写机房等级'" style="width: 200px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">机房电话</th>
				<td><input name="cr_phone" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写机房电话'" style="width: 200px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">技术联系人</th>
				<td><input name="cr_tech_linkname" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写机房技术联系人'" style="width: 400px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">技术联系电话</th>
				<td><input name="cr_tech_phone" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写技术联系电话'" style="width: 400px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">IM/QQ/MSN</th>
				<td><input name="cr_chat_tools" class="easyui-validatebox" style="width: 400px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">客户经理</th>
				<td><input name="cr_sales" class="easyui-validatebox" style="width: 400px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">客户经理电话</th>
				<td><input name="cr_sales_phone" class="easyui-validatebox" style="width: 400px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">客户经理手机</th>
				<td><input name="cr_sales_mobile" class="easyui-validatebox" style="width: 400px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">客户经理邮件</th>
				<td><input name="cr_sales_email" class="easyui-validatebox" data-options="validType:'email'" style="width: 400px;" />
				</td>
			</tr>
            <tr>
                <th style="width:80px;">机房地址</th>
                <td>
					<input style="line-height:26px;border:1px solid #ccc;width:130px" class="easyui-combobox" 
                        name="province_id" id="province_id" />                    
                    <input style="line-height:26px;border:1px solid #ccc;width:140px" class="easyui-combobox" 
                        name="city_id" id="city_id" />
                    <input style="line-height:26px;border:1px solid #ccc;width:120px" class="easyui-combobox" 
                        name="area_id" id="area_id" />
                    <input name="cr_address" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写机房地址'" style="width: 400px;" />
                </td>
            </tr>
            <tr>
				<th style="width: 80px;">备注</th>
				<td colspan="3"><textarea name="comment" style="height: 50px;width: 97%;"></textarea>
				</td>
			</tr>          
		</table>
	</form>
</div>